home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / AmigaUUCP / uucico / uupoll.c < prev    next >
C/C++ Source or Header  |  1990-12-30  |  1KB  |  63 lines

  1.  
  2. /*
  3.  * UUPOLL  -- call a UUCP connect site
  4.  *
  5.  *  $Header: Beta:src/uucp/src/uucico/RCS/uupoll.c,v 1.1 90/02/02 11:56:15 dillon Exp Locker: dillon $
  6.  *
  7.  * Usage: UUPOLL <system-name>
  8.  *
  9.  * Copyright 1988 by William Loftus.  All rights reserved.
  10.  *
  11.  * ARPA: wpl@prc.unisys.com
  12.  * UUCP: wpl@burdvax.UUCP
  13.  * USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
  14.  *
  15.  */
  16.  
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <string.h>
  20. #include "version.h"
  21. #include "protos.h"
  22.  
  23. #define LOCK_FILE "t:UUCP.LCK"
  24.  
  25. #define TRUE 1
  26. #define FALSE 0
  27.  
  28. IDENT(".04");
  29.  
  30. CXBRK()
  31. {
  32.     return(0);
  33. }
  34.  
  35. main (argc, argv)
  36. int argc;
  37. char ** argv;
  38. {
  39.   static  char buf[256];
  40.  
  41.   if (argc != 2) {
  42.      printf("Usage: UUPOLL <system-name>\n");
  43.      exit(1);
  44.   }
  45.  
  46.   if (access(LOCK_FILE,0) != -1) {
  47.      printf("UUCP is locked.\n");
  48.      exit(0);
  49.   }
  50.  
  51.     if (is_in_L_sys_file(argv[1])) {
  52.     sprintf(buf, "run >nil: <nil: UUCICO -s%s\n", argv[1]);
  53.     if (system(buf) == -1) {
  54.         printf("Error spawning task to call system \"%s\"\n", argv[1]);
  55.     }
  56.     } else {
  57.     printf("System \"%s\" not in L.sys file.\n", argv[1]);
  58.     }
  59.     return(0);
  60. }
  61.  
  62.  
  63.